<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Daily
 *
 * @author bom
 */
class Daily extends Zend_Db_Table_Abstract {
    //put your code here
    protected $_name = 'report_daily';
    protected $_primary = 'id';

    public function getTotalCount(){
        $query = 'select sum(visit) as total from '.$this->_name;

        $tb = Zend_Db_Table::getDefaultAdapter();
        $tb->setFetchMode(Zend_Db::FETCH_OBJ);
        $tmp = $tb->fetchRow($query);
        return $tmp->total;
    }
}
?>
